Skip to content

Conversation

@dhaidashenko
Copy link
Collaborator

No description provided.

@dhaidashenko dhaidashenko marked this pull request as ready for review December 5, 2025 14:21
@dhaidashenko dhaidashenko requested a review from a team as a code owner December 5, 2025 14:21
Copilot AI review requested due to automatic review settings December 5, 2025 14:21
@dhaidashenko dhaidashenko requested a review from a team as a code owner December 5, 2025 14:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements capability configuration merging to prevent accidental removal of existing capabilities when adding new ones to a DON (Decentralized Oracle Network). The core change introduces a merge mechanism that preserves existing capabilities on-chain when new capabilities are added.

  • Adds a MergeCapabilityConfigsWithOnChain flag to control whether new capabilities should be merged with existing ones
  • Refactors capability configuration logic to use a map-based approach with deduplication
  • Extends test coverage to verify that adding multiple capabilities sequentially preserves all configurations

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
deployment/cre/capabilities_registry/v2/changeset/sequences/add_capabilities.go Sets merge flag to true when updating DON capabilities
deployment/cre/capabilities_registry/v2/changeset/operations/contracts/update_don.go Implements capability merging logic with map-based deduplication and sorting
deployment/cre/capabilities_registry/v2/changeset/add_capabilities_test.go Adds test to verify sequential capability additions preserve existing configurations

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

vyzaldysanchez
vyzaldysanchez previously approved these changes Dec 5, 2025
@cl-sonarqube-production
Copy link

@trunk-io
Copy link

trunk-io bot commented Dec 5, 2025

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@dhaidashenko dhaidashenko changed the title PLEX-2149 fix add capabilities CLD to prevent removal of existing abilities in the DON PLEX-2149 fix add capabilities CLD to prevent removal of existing cabilities in the DON Dec 8, 2025
@graham-chainlink graham-chainlink added this pull request to the merge queue Dec 8, 2025
Merged via the queue into develop with commit 1e6d72f Dec 8, 2025
265 of 282 checks passed
@graham-chainlink graham-chainlink deleted the feature/PLEX-2149-fix-add-capability branch December 8, 2025 16:05
krehermann pushed a commit that referenced this pull request Dec 11, 2025
…ilities in the DON (#20530)

* PLEX-2149 fix add capabilities CLD to prevent removal of existing capabilities in the DON

* Update deployment/cre/capabilities_registry/v2/changeset/add_capabilities_test.go

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
(cherry picked from commit 1e6d72f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants